class FgsException(Exception):
    def __init__(self, msg, child=None):
        self.child = child
        if child:
            self.msg = msg + ': ' + child
        else:
            self.msg = msg

    def __str__(self):
        return self.msg

    def __repr__(self):
        return "FgsException: %s" % self.msg
